<?php

namespace liketp\route;

use liketp\Request;
use liketp\Route;

class Domain extends RuleGroup
{
    public function __construct(Route $router, string $domain)
    {
        $this->router = $router;
        $this->domain = $domain;
    }

    public function check(Request $request, string $url, bool $completeMatch = false)
    {
        // check domain bind
        $result = $this->checkBind();
        if ($result) return $result;

        $result = parent::check($request, $url, $completeMatch);

        return $result;
    }


    //------------------------------------------------ protected
    protected function checkBind() {}
}
